	package com.erpanderp.wam.ac.view.reimbursement;
	
	import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
	import java.util.Date;
	import java.util.List;
import java.util.Map;
	
import javax.faces.application.FacesMessage;
	import javax.faces.bean.ManagedBean;
	import javax.faces.bean.ViewScoped;
	import javax.faces.context.FacesContext;
	
import javax.faces.event.ActionEvent;
import javax.faces.event.AjaxBehaviorEvent;
	import javax.faces.event.ValueChangeEvent;
	import javax.servlet.ServletContext;
	import javax.servlet.http.HttpServletRequest;
	import javax.servlet.http.HttpSession;
import javax.swing.SwingWorker;

import org.primefaces.context.RequestContext;
	
	import com.erpanderp.wam.ac.model.entity.project.ProjectAssignment;
	import com.erpanderp.wam.ac.model.entity.project.ProjectAssignmentDetail;
import com.erpanderp.wam.ac.model.entity.reimbursement.ProjectPerdiem;
import com.erpanderp.wam.ac.model.entity.reimbursement.ProjectPerdiemDetail;
	import com.erpanderp.wam.ac.model.service.project.ProjectAssignmentDAO;
import com.erpanderp.wam.ac.model.service.reimbursement.ProjectPerdiemDAO;
	import com.erpanderp.wam.usm.model.entity.projectandassignment.Project;
import com.erpanderp.wam.usm.model.entity.user.Employee;
import com.erpanderp.wam.usm.model.entity.user.EmployeeAndReporting;
	import com.erpanderp.wam.usm.model.entity.user.WAMUser;
	import com.erpanderp.wam.usm.model.service.projectandassignment.ProjectDAO;
import com.erpanderp.wam.usm.model.service.user.EmployeeAndReportingDAO;
import com.erpanderp.wam.usm.model.service.user.EmployeeDAO;
import com.erpanderp.wam.util.CommonLookup;
import com.erpanderp.wam.util.EmailUtil;
import com.erpanderp.wam.util.ValidationUtil;
import com.erpanderp.wam.util.WAMHostManager;
	
	
	@ManagedBean
	@ViewScoped
	public class CreateProjectPerdiemBean {
		
		HttpSession session = (HttpSession) FacesContext.getCurrentInstance().getExternalContext().getSession(true);
		ServletContext context = (ServletContext) FacesContext.getCurrentInstance().getExternalContext().getContext();
		HttpServletRequest request = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();
		
		private String projectAssignmentId;
		private String employeeCode;
		private WAMUser wamUser = new WAMUser();
		private Project project = new Project();
		private ProjectAssignmentDAO projectAssignmentDAO  = new ProjectAssignmentDAO();
		private ProjectDAO projectDAO = new ProjectDAO();
		private ProjectAssignmentDetail projectAssignmentDetail = new ProjectAssignmentDetail();
		private List<ProjectAssignment> projectAssignmentsList = new ArrayList<ProjectAssignment>(); 
		private ProjectAssignment projectAssignment = new ProjectAssignment();
		private ProjectAssignmentDetail proAssignmentDetail = new ProjectAssignmentDetail();
		private String projectPerdiemCode;
		private Date requestDate;
		private ProjectPerdiem projectPerdiem = new ProjectPerdiem();
		private ProjectPerdiemDetail projectPerdiemDetail = new ProjectPerdiemDetail(); 
		private float totalAmount;
		private ProjectPerdiemDAO projectPerdiemDAO = new ProjectPerdiemDAO();
		private boolean readOnlyinput;
		private boolean previousDisbursementSummary;
		private EmailUtil emailUtil = new EmailUtil();
		private String EMAIL_MESSAGE;
		private EmployeeAndReporting employeeAndReporting = new EmployeeAndReporting();
		private EmployeeAndReportingDAO employeeAndReportingDAO = new EmployeeAndReportingDAO();
		private boolean FORM_VALID;
		ProjectPerdiem projectPerdiemPrevious = new ProjectPerdiem();
		private boolean miscRenderer;
		SimpleDateFormat sdf = new SimpleDateFormat("dd-MMM-yyyy");
		private Employee vicePresident;
		public CreateProjectPerdiemBean(){
			if(wamUser != null){
				vicePresident = new EmployeeDAO().getVP();
			wamUser = (WAMUser) session.getAttribute(CommonLookup.SESSION_ATTRIBUTE_WAMUSER);
			employeeAndReporting = employeeAndReportingDAO.getEmployeeReportingDetail(wamUser.getEmployee().getEmployeeId());
			projectAssignmentId = request.getParameter("projectAssignmentId");
			employeeCode = request.getParameter("employeeCode");
			projectPerdiem.setEmployee(wamUser.getEmployee());
			projectPerdiem.setProjectPerdiemCode(CommonLookup.getAutoGeneratedPerdiemExpensesFormCode(projectAssignmentId,employeeCode));
			System.out.println("PROJECT PERDIEM CODE "+projectPerdiemCode);
			requestDate = new Date();
			projectAssignmentDAO = new ProjectAssignmentDAO();
			projectAssignment = projectAssignmentDAO.getProjectAssignmentByProjectAssignmentIdAndEmployeeId(projectAssignmentId,wamUser.getEmployee().getEmployeeId());
			projectPerdiem.setProjectAssignment(projectAssignment); 
			/*System.out.println("PROJECT PERDIEM IDDDDDDDDD"+projectPerdiem.getProjectPerdiemId());
			System.out.println("EMPLOYEE IDDDDDDDDD"+projectPerdiem.getEmployee().getEmployeeId());
			System.out.println("PAS IDDDDDDDDD"+projectPerdiem.getProjectAssignment().getProjectAssignmentId());
			System.out.println("PORJECT ASSIGNMENT CODE IS"+projectAssignment.getProjectAssignmentCode());
			*/
			employeeAndReporting = employeeAndReportingDAO.getEmployeeReportingDetail(wamUser.getEmployee().getEmployeeId());
			
			if(projectAssignment != null)
			  System.out.println("PROJECT ASSIGNMENT ID -----"+projectAssignment.getProjectAssignmentId());
			  projectAssignmentDetail = new ProjectAssignmentDAO().getProjectAssignmentDetailByProjectAssignmentId(projectAssignment.getProjectAssignmentId());
			  System.out.println("PROJECT ASSIGNMENT DETAILS "+proAssignmentDetail.getDailyAllowance());
			  //totalAmount = projectAssignmentDetail.getDailyAllowance()+projectAssignmentDetail.getAdvanceAmount()+projectAssignmentDetail.getRoomRentAdvance()+projectAssignmentDetail.getRoomRentPerMonth();
			  //projectPerdiemDetail.setTotalAmount(totalAmount);
			  projectPerdiemPrevious = 	projectPerdiemDAO.getProjectPerdiemByProjectAssignmentId(projectAssignment.getProjectAssignmentId());
			if(projectPerdiem != null){
				System.out.println("TRUE---------");
				readOnlyinput = true;
				previousDisbursementSummary = true;
				
			}else{
				System.out.println("FALSE---------");
				readOnlyinput = false;
				previousDisbursementSummary = false;
			}
			}else{
				ValidationUtil.gotoLoginPage();
			}
		   
		
	}
	
	
		public void totalAmountByRoomRentOnChange(AjaxBehaviorEvent e){
			System.out.println("ON CHANGE LISTNER");
				//totalAmount = projectAssignmentDetail.getDailyAllowance()+projectAssignmentDetail.getAdvanceAmount()+projectAssignmentDetail.getRoomRentAdvance()+proAssignmentDetail.getRoomRentPerMonth();
			    System.out.println("ROOM RENT AMOUNT IS----------------- "+projectPerdiemDetail.getRoomRentAmount());
			
			   
			    projectPerdiemDetail.setTotalAmount(projectPerdiemDetail.getTotalAmount()+projectPerdiemDetail.getRoomRentAmount());
			    projectPerdiemDetail.setRoomRentAmount(0);
			   
			}
		public void totalAmountByMiscOnchange(){
			System.out.println("ON CHANGE LISTNER");
				//totalAmount = projectAssignmentDetail.getDailyAllowance()+projectAssignmentDetail.getAdvanceAmount()+projectAssignmentDetail.getRoomRentAdvance()+proAssignmentDetail.getRoomRentPerMonth();
			    System.out.println("ROOM RENT AMOUNT IS----------------- "+projectPerdiemDetail.getRoomRentAmount());
			
			    projectPerdiemDetail.setTotalAmount(projectPerdiemDetail.getTotalAmount()+projectPerdiemDetail.getMiscAmount());
			    projectPerdiemDetail.setMiscAmount(0);
			
			}
		
	
		public void calculatePerdiems(ActionEvent a){
			Date min = projectPerdiemDetail.getPerdiemFrom();
			Date max = projectPerdiemDetail.getPerdeimTo();
			System.out.println("IN DAYS CALC");
			long noOfDays = daysBetween(max, min);
			System.out.println("NO OF DAYS "+noOfDays);
		  
			projectPerdiemDetail.setPerdeimAmount(noOfDays*projectAssignmentDetail.getDailyAllowance());
			projectPerdiemDetail.setTotalAmount(projectPerdiemDetail.getTotalAmount()+noOfDays*projectAssignmentDetail.getDailyAllowance());
			
			System.out.println("TOTAL AMOUNT "+projectPerdiemDetail.getTotalAmount());
			
		}
		
		public long daysBetween(Date max, Date min)
		{
		 System.out.println("IN DAYS CALC");
		 System.out.println("IN DAYSBETWEEN METHOD");
		 System.out.println("MAX DATE :"+max);
		 System.out.println("MIN DATE :"+min);
		
		 return ((max.getTime() - min.getTime())/86400000)+1;
		}
		
		public void saveProjectPerdiem() throws ParseException{
			
			validate();
			if(FORM_VALID){
				
		        projectPerdiem.setRequestDate(requestDate);
				projectPerdiem.setProjectAssignment(projectAssignment);
				
				projectPerdiem.setRequestStatus("ACTIVE");
				projectPerdiem.setCreateDate(new Date());
				projectPerdiem.setCreatedBy(wamUser.getEmployee().getFirstName());
				projectPerdiem.setStatus("ACTIVE");
				projectPerdiemDetail.setRequestDate(new Date());
				projectPerdiemDetail.setRevision(CommonLookup.generatePerdiemRivision());
				projectPerdiemDetail.setPerdeimRequestStatus(CommonLookup.PERDIEM_INPROCESS__STATUS);
				projectPerdiemDetail.setRecommendationStatus(CommonLookup.PERDIEM_INPROCESS__STATUS);
				projectPerdiemDetail.setApprovalStatus(CommonLookup.PERDIEM_INPROCESS__STATUS);
				projectPerdiemDetail.setCreatedBy(wamUser.getEmployee().getFirstName());
				projectPerdiemDetail.setCreateDate(new Date());
				projectPerdiemDetail.setStatus("ACTIVE");
				
				System.out.println("-----------PROJECT PERDIEM ID-----------"+projectPerdiem.getProjectPerdiemId());
				System.out.println("-----------PROJECT PERDIEM CODE-----------"+projectPerdiem.getProjectPerdiemCode());
				System.out.println("-----------PROJECT PERDIEM STATUS-----------"+projectPerdiem.getStatus());
				System.out.println("-----------PROJECT PERDIEM TOTAL AMOUNT IS-----------"+projectPerdiemDetail.getTotalAmount());
				projectPerdiem.getProjectPerdiemDetails().add(projectPerdiemDetail);
			    
				
				
				if(projectPerdiemDAO.createProjectPerdiem(projectPerdiem)){
				
				 FacesMessage msg = new FacesMessage("Project Perdiems Request form created Successful", null);  
			     FacesContext.getCurrentInstance().addMessage(null, msg);
				}else{
					 FacesMessage msg = new FacesMessage("Project Perdiems Request form failled", null);  
				     FacesContext.getCurrentInstance().addMessage(null, msg);
				}
				
				Map<String, String> hostsMap = WAMHostManager.getWAMHosts(context);
				String domainName = context.getInitParameter("domainName");
				String messageString ="";		

			    /*
			     * MAIL TO RECOMMENDER EMAIL
			     */
				emailUtil = new EmailUtil();
				if (hostsMap.get(CommonLookup.DEV_EMAIL) == null) {
					String[] to = { employeeAndReporting.getProjectManager().getEmail() };
					emailUtil.setRecieverAddresses(to);
				} else {
					String[] to = { hostsMap.get(CommonLookup.DEV_EMAIL) };
					System.out.println(to);
					emailUtil.setRecieverAddresses(to);
				}
						
				String requestURL = "ac/reimbursement/approveprojectperdiems.html?projectPerdiemCode=" +projectPerdiem.getProjectPerdiemCode()+"&projectAssignmentCode="+projectAssignment.getProjectAssignmentCode()+"&employeeCode="+wamUser.getEmployee().getEmployeeCode()+"&revision="+projectPerdiemDetail.getRevision();
				String privateLink = "http://" + hostsMap.get(CommonLookup.PRIVATEHOST) + "/" + domainName + "/" + requestURL;
				String publicLink = "http://" + hostsMap.get(CommonLookup.PUBLICHOST) + "/"	+ domainName + "/" + requestURL;
				
				messageString = "Dear " + employeeAndReporting.getProjectManager().getFirstName()+ " " + employeeAndReporting.getProjectManager().getLastName() + "" +
										",<br /><br />" +
										
										"<table style='border: 1px solid #d9d9d9;'>" +
								        "<tr> <td>Employee Name</td><td> : </td><td>" + projectPerdiem.getEmployee().getFirstName()+" "+projectPerdiem.getEmployee().getLastName()+"</td></tr>" +
								        "<tr> <td>Employee Id</td><td> : </td><td>" + projectPerdiem.getEmployee().getEmployeeCode()+ " </td></tr>" +
								        "<tr> <td>Travel Request Id</td><td> : </td><td>" + projectPerdiem.getProjectPerdiemCode()+ " </td></tr>" +
								       			       
								        "</table><br/>"+							       
								        "<a style='color:#FF9933;font-weight: bold;' href=\""+
								        privateLink + "\">" + "Please click here to Recommend/Reject project perdiem form request" + "</a /><br />"+
										"(Employees who are in Hyderabad office)"+"<br /><br />"+
										"<a style='color:#FF9933;font-weight: bold;' href=\""+
										publicLink + "\">" + "Please click here to Recommend/Reject project perdiem form request" + "</a /><br />"+
										"(out side Hyderabad office)"+"<br /><br />"+
										
										"Thanks & Regards, <br />"+CommonLookup.WAM_DEVTEAM_SIGNATURE;
				emailUtil.setMessage(messageString);
				emailUtil.setSenderEmail("podquick@erpanderp.com", "WAM - Dev Team");
				emailUtil.setSubject("WAM -"+wamUser.getEmployee().getFirstName()+" "+wamUser.getEmployee().getLastName() +"( "+projectPerdiem.getProjectPerdiemCode()+" ) - Project Perdiems Request");
				
				SwingWorker worker = new SwingWorker<String, Object>() {
					@Override
					protected String doInBackground() throws Exception {
						EMAIL_MESSAGE = emailUtil.processAndSendEmail();
						return null;
					}

					@Override
					protected void done() {
							System.out.println("DONE " + EMAIL_MESSAGE);		
					}
				};
				worker.execute();
				System.out.println( "BEFORE RETURNING: " + EMAIL_MESSAGE);
			
				
			}else{
				System.out.println("FORM NOT VALID");
			}
		}
		
		 public void validate() throws ParseException{
			 System.out.println("IN VALIDATE METHOD");
				Date perdiemPeriodFrom = projectPerdiemDetail.getPerdiemFrom() != null ? projectPerdiemDetail.getPerdiemFrom(): null;
				Date perdiemPeriodTo = projectPerdiemDetail.getPerdeimTo() != null ? projectPerdiemDetail.getPerdeimTo(): null;
				
				Date roomrentPeriodFrom = projectPerdiemDetail.getRoomRentFrom() != null ? projectPerdiemDetail.getRoomRentFrom(): null;
				Date roomrentPeriodTo = projectPerdiemDetail.getRoomRentTo() != null ? projectPerdiemDetail.getRoomRentTo(): null;
				
				Date miscPeriodFrom = projectPerdiemDetail.getMiscFrom() != null ? projectPerdiemDetail.getMiscFrom(): null;
				Date miscPeriodTo = projectPerdiemDetail.getMiscTo() != null ? projectPerdiemDetail.getMiscTo(): null;
				
				
				
				FORM_VALID = true;
				if(ValidationUtil.isEmpty(String.valueOf(projectPerdiemDetail.getRoomRentAmount()), "Room Rent Amount", null, FacesContext.getCurrentInstance()) != null){
					System.out.println("---------ROOM RENT AMOUNT IS EMPTY-----------");
					FORM_VALID = false;
				}
				if(ValidationUtil.isEmpty(String.valueOf(projectPerdiemDetail.getMiscAmount()), "Perdiem Amount", null, FacesContext.getCurrentInstance()) != null){
					FORM_VALID = false;
				}
				if(ValidationUtil.isEmpty(String.valueOf(projectPerdiemDetail.getPerdeimAmount()), "Perdiems total", null, FacesContext.getCurrentInstance()) != null){
					FORM_VALID = false;
				}
				if(ValidationUtil.isEmpty(String.valueOf(projectPerdiemDetail.getTotalAmount()), "Total Amount", null, FacesContext.getCurrentInstance()) != null){
					FORM_VALID = false;
				}
				if(ValidationUtil.isEmpty((projectPerdiemDetail.getRoomRentFrom() != null)?projectPerdiemDetail.getRoomRentFrom().toString() : null, "Room Rent From", null, FacesContext.getCurrentInstance()) != null){
					FORM_VALID = false;
				}
				if(ValidationUtil.isEmpty((projectPerdiemDetail.getRoomRentTo() != null)?projectPerdiemDetail.getRoomRentTo().toString() : null, "Room Rent To", null, FacesContext.getCurrentInstance()) != null){
					FORM_VALID = false;
				}
				if(ValidationUtil.isEmpty((projectPerdiemDetail.getPerdiemFrom() != null)?projectPerdiemDetail.getPerdiemFrom().toString() : null, "Perdime From", null, FacesContext.getCurrentInstance()) != null){
					FORM_VALID = false;
				}
				if(ValidationUtil.isEmpty((projectPerdiemDetail.getPerdeimTo() != null)?projectPerdiemDetail.getPerdeimTo().toString() : null, "Perdime To", null, FacesContext.getCurrentInstance()) != null){
					FORM_VALID = false;
				}
				if(ValidationUtil.isEmpty((projectPerdiemDetail.getMiscFrom() != null)?projectPerdiemDetail.getMiscFrom().toString() : null, "Miscellaneous From", null, FacesContext.getCurrentInstance()) != null){
					FORM_VALID = false;
				}
				if(ValidationUtil.isEmpty((projectPerdiemDetail.getMiscTo() != null)?projectPerdiemDetail.getMiscTo().toString() : null, "Miscellaneous To", null, FacesContext.getCurrentInstance()) != null){
					FORM_VALID = false;
				}
				if(projectPerdiemDetail.getMiscAmount() == 0){
					FORM_VALID = false;
					FacesContext.getCurrentInstance().addMessage(null,new FacesMessage(FacesMessage.SEVERITY_WARN,"Miscellaneous amount should not zero.", ""));
				}
				if(projectPerdiemDetail.getPerdeimAmount() == 0){
					FORM_VALID = false;
					FacesContext.getCurrentInstance().addMessage(null,new FacesMessage(FacesMessage.SEVERITY_WARN,"Perdiem amount should not zero.", ""));
				}
				if(projectPerdiemDetail.getRoomRentAmount() == 0){
					FORM_VALID = false;
					FacesContext.getCurrentInstance().addMessage(null,new FacesMessage(FacesMessage.SEVERITY_WARN,"Room rent amount should not zero.", ""));
				}
				if(projectPerdiemDetail.getTotalAmount() == 0){
					FORM_VALID = false;
					FacesContext.getCurrentInstance().addMessage(null,new FacesMessage(FacesMessage.SEVERITY_WARN,"Total  amount should not zero.", ""));
				}
			
			
				
				if(perdiemPeriodFrom != null && perdiemPeriodTo != null){
					
					String fromDate = sdf.format(perdiemPeriodFrom);
					String toDate = sdf.format(perdiemPeriodTo);
					
					
					Date date1 = sdf.parse(fromDate);
			    	Date date2 = sdf.parse(toDate);
			    	if(date1.compareTo(date2)>0){
						FORM_VALID = false;
			    		System.out.println("FROMDATE is after TODATE");
			    		FacesContext.getCurrentInstance().addMessage(null,new FacesMessage(FacesMessage.SEVERITY_WARN,"Perdiems From Date should not be more than To Date", ""));
			    	}
				}
				

				if(roomrentPeriodFrom != null && roomrentPeriodTo != null){
					
					String fromDate = sdf.format(roomrentPeriodFrom);
					String toDate = sdf.format(roomrentPeriodTo);
					
					
					Date date1 = sdf.parse(fromDate);
			    	Date date2 = sdf.parse(toDate);
			    	if(date1.compareTo(date2)>0){
						FORM_VALID = false;
			    		System.out.println("FROMDATE is after TODATE");
			    		FacesContext.getCurrentInstance().addMessage(null,new FacesMessage(FacesMessage.SEVERITY_WARN,"Room rent From Date should not be more than To Date", ""));
			    	}
				}
				
	         if(miscPeriodFrom != null && miscPeriodTo != null){
					
					String fromDate = sdf.format(miscPeriodFrom);
					String toDate = sdf.format(miscPeriodTo);
					
					
					Date date1 = sdf.parse(fromDate);
			    	Date date2 = sdf.parse(toDate);
			    	if(date1.compareTo(date2)>0){
						FORM_VALID = false;
			    		System.out.println("FROMDATE is after TODATE");
			    		FacesContext.getCurrentInstance().addMessage(null,new FacesMessage(FacesMessage.SEVERITY_WARN,"Miscellaneous From Date should not be more than To Date", ""));
			    	}
				}
				
				System.out.println("FORM_VALID ======"+FORM_VALID);
						
				
		 }
		
	
		public String getEmployeeCode() {
			return employeeCode;
		}
	
		public void setEmployeeCode(String employeeCode) {
			this.employeeCode = employeeCode;
		}
	
		public WAMUser getWamUser() {
			return wamUser;
		}
	
		public void setWamUser(WAMUser wamUser) {
			this.wamUser = wamUser;
		}
	
	
	
	
	
	
	
	
		public String getProjectAssignmentId() {
			return projectAssignmentId;
		}
	
	
	
	
	
	
	
	
		public void setProjectAssignmentId(String projectAssignmentId) {
			this.projectAssignmentId = projectAssignmentId;
		}
	
	
	
	
	
	
	
	
		public Project getProject() {
			return project;
		}
	
	
	
	
	
	
	
	
		public void setProject(Project project) {
			this.project = project;
		}
	
	
	
	
	
	
	
	
		public ProjectAssignmentDetail getProjectAssignmentDetail() {
			return projectAssignmentDetail;
		}
	
	
	
	
	
	
	
	
		public void setProjectAssignmentDetail(ProjectAssignmentDetail projectAssignmentDetail) {
			this.projectAssignmentDetail = projectAssignmentDetail;
		}
	
	
	
	
	
	
	
	
		public List<ProjectAssignment> getProjectAssignmentsList() {
			return projectAssignmentsList;
		}
	
	
	
	
	
	
	
	
		public void setProjectAssignmentsList(List<ProjectAssignment> projectAssignmentsList) {
			this.projectAssignmentsList = projectAssignmentsList;
		}
	
	
	
	
	
	
	
	
		public ProjectAssignment getProjectAssignment() {
			return projectAssignment;
		}
	
	
	
	
	
	
	
	
		public void setProjectAssignment(ProjectAssignment projectAssignment) {
			this.projectAssignment = projectAssignment;
		}
	
	
	
	
	
	
	
	
		public ProjectAssignmentDetail getProAssignmentDetail() {
			return proAssignmentDetail;
		}
	
	
	
	
	
	
	
	
		public void setProAssignmentDetail(ProjectAssignmentDetail proAssignmentDetail) {
			this.proAssignmentDetail = proAssignmentDetail;
		}
	
	
	
	
	
	
	
	
		public String getProjectPerdiemCode() {
			return projectPerdiemCode;
		}
	
	
	
	
	
	
	
	
		public void setProjectPerdiemCode(String projectPerdiemCode) {
			this.projectPerdiemCode = projectPerdiemCode;
		}
	
	
	
	
	
	
	
	
		public Date getRequestDate() {
			return requestDate;
		}
	
	
	
	
	
	
	
	
		public void setRequestDate(Date requestDate) {
			this.requestDate = requestDate;
		}


		public ProjectPerdiem getProjectPerdiem() {
			return projectPerdiem;
		}


		public void setProjectPerdiem(ProjectPerdiem projectPerdiem) {
			this.projectPerdiem = projectPerdiem;
		}


		public ProjectPerdiemDetail getProjectPerdiemDetail() {
			return projectPerdiemDetail;
		}


		public void setProjectPerdiemDetail(ProjectPerdiemDetail projectPerdiemDetail) {
			this.projectPerdiemDetail = projectPerdiemDetail;
		}


		public float getTotalAmount() {
			return totalAmount;
		}


		public void setTotalAmount(float totalAmount) {
			this.totalAmount = totalAmount;
		}


		public boolean isReadOnlyinput() {
			return readOnlyinput;
		}


		public void setReadOnlyinput(boolean readOnlyinput) {
			this.readOnlyinput = readOnlyinput;
		}


		public boolean isPreviousDisbursementSummary() {
			return previousDisbursementSummary;
		}


		public void setPreviousDisbursementSummary(
				boolean previousDisbursementSummary) {
			this.previousDisbursementSummary = previousDisbursementSummary;
		}


		public EmailUtil getEmailUtil() {
			return emailUtil;
		}


		public void setEmailUtil(EmailUtil emailUtil) {
			this.emailUtil = emailUtil;
		}



		public EmployeeAndReporting getEmployeeAndReporting() {
			return employeeAndReporting;
		}


		public void setEmployeeAndReporting(EmployeeAndReporting employeeAndReporting) {
			this.employeeAndReporting = employeeAndReporting;
		}


		public String getEMAIL_MESSAGE() {
			return EMAIL_MESSAGE;
		}


		public void setEMAIL_MESSAGE(String eMAIL_MESSAGE) {
			EMAIL_MESSAGE = eMAIL_MESSAGE;
		}


		public boolean isFORM_VALID() {
			return FORM_VALID;
		}


		public void setFORM_VALID(boolean fORM_VALID) {
			FORM_VALID = fORM_VALID;
		}


		public boolean isMiscRenderer() {
			return miscRenderer;
		}


		public void setMiscRenderer(boolean miscRenderer) {
			this.miscRenderer = miscRenderer;
		}


		public Employee getVicePresident() {
			return vicePresident;
		}


		public void setVicePresident(Employee vicePresident) {
			this.vicePresident = vicePresident;
		}
	
	}
